home *** CD-ROM | disk | FTP | other *** search
/ Interactive Quarterly / The Best of New Machine Publishing 1 - Disc 4: Interactive Quarterly.iso / pc / demos / az / cyberx.dxr / 00256_CONTROL NIVEL SONIDO.ls < prev    next >
Encoding:
Text File  |  1996-10-06  |  701 b   |  28 lines

  1. on mouseDown
  2.   cursor(200)
  3.   repeat while the mouseDown
  4.     if (the mouseH < 312) and (the mouseH > 258) then
  5.       puppetSprite(7, 1)
  6.       set the locH of sprite 7 to the mouseH
  7.       updateStage()
  8.     else
  9.       if the mouseH > 312 then
  10.         set the locH of sprite 7 to 312
  11.         updateStage()
  12.       else
  13.         if the mouseH < 258 then
  14.           set the locH of sprite 7 to 258
  15.           updateStage()
  16.         end if
  17.       end if
  18.     end if
  19.     set the volume of sound 2 to integer((the locH of sprite 7 - 258) * (float(256) / float(54)))
  20.   end repeat
  21. end
  22.  
  23. on mouseUp
  24.   global niv_sonido2
  25.   cursor(0)
  26.   set niv_sonido2 to integer((the locH of sprite 7 - 258) * (float(256) / float(54)))
  27. end
  28.